package course_9_2.eg;

import java.io.*;
import java.util.Scanner;

public class Checked {
    public static void main(String[] args) {
        try {
            File file=new File(
                    "C:\\Users\\Administrator\\IdeaProjects\\untitled\\src\\course_9_2\\test\\test.txt");
            Scanner scanner = new Scanner(file);
            scanner.close();
            InputStreamReader inputStreamReader=new InputStreamReader(System.in);
            System.out.println("Enter something!");
            BufferedReader bufferedReader=new BufferedReader(inputStreamReader);
            System.out.println("You have just entered:"+bufferedReader.readLine());
        }catch (FileNotFoundException e){
            System.out.println(e.getMessage());
        }catch (IOException ioException){
            System.out.println(ioException.getMessage());
        }
    }
}
